import 'package:flutter/material.dart';

class ButtonWidget extends StatefulWidget {
  double borderRadius;
  Widget child;

  double width;

  double height;

  Function() onPressed;

  ButtonWidget(
      {super.key,
      required double this.width,
      required double this.height,
      required Function() this.onPressed,
      required Widget this.child,
      required Color highlightedColor,
      required Color bgColor,
      required bool enabled,
      required Color bgHighlightedColor,
      required MaterialColor bgDisableColor,
      required double this.borderRadius});

  @override
  State<ButtonWidget> createState() => _ButtonWidgetState();
}

class _ButtonWidgetState extends State<ButtonWidget> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: (){
        widget.onPressed.call();
      },
      child: Container(
      height: widget.height,
      width: widget.width,
      margin: EdgeInsets.symmetric(vertical: 10),
      decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(widget.borderRadius)),
      child: widget.child,
    ),);
  }
}
